<h4>Navigation</h4>
<center>
	<script src="tohomejs.js" type="text/javascript"></script>
	<noscript>
		<OBJECT id="tohomeobj"
			classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
			WIDTH=230 HEIGHT=50>
			<PARAM NAME=movie VALUE="tohome.swf">
			<PARAM NAME=menu VALUE=false>
			<PARAM NAME=quality VALUE=high>
			<PARAM NAME=wmode VALUE=opaque>
			<param name="scale" value="noscale" />
			<PARAM NAME=bgcolor VALUE=#FFFFFF>
			<EMBED src="tohome.swf" menu=false quality=high scale="noscale"
				wmode=opaque bgcolor=#FFFFFF WIDTH=230 HEIGHT=50
				TYPE="application/x-shockwave-flash"
				PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
		</OBJECT>
	</noscript>
</center>

<h4>Log in</h4>
<table width="200" align="center">
	<form action="authenticate.php" method="post">
		<tr>
			<td><b style="color: #069">Tutorial Centre:</b></td>
		</tr>
		<tr>
			<td><select name="tcentre">';
			<?php
			pg_connect("host=localhost user=postgres password=password dbname=tbms_databases") or die(ps_last_error());

			$sql = "select * from databases order by tutorial_centre asc;";
			$result = pg_query($sql);
			for($i = 0; $i < pg_num_rows($result); $i++)
			{
				$centrename = pg_fetch_result($result, $i, 'tutorial_centre');
				$centreid = "db".pg_fetch_result($result, $i, 'database_id');
				echo "<option value = \"$centreid\">$centrename</option>";
			}
			?>
			</select>
			</td>
		</tr>
		<tr>
			<td><b style="color: #069">Username:</b></td>
		</tr>
		<tr>
			<td><input name="username" type="text" size="25" /></td>
		</tr>
		<tr>
			<td><b style="color: #069">Password:</b></td>
		</tr>
		<tr>
			<td><input name="password" type="password" size="25" /></td>
		</tr>
		<tr>
			<td><input name="submit" type="submit" value="Login" /></td>
		</tr>
	</form>
</table>

<br />
